#include <cctype>
#include <climits>
#include <iostream>
using namespace std;

int main() {
    string str;
    cin >> str;

    string cur_ans;
    string max_ans;

    for (char ch : str) {
        if (isdigit(ch)) {
            cur_ans += ch;
        } else {
            if (cur_ans.length() > max_ans.length()) {
                max_ans = cur_ans;
            }
            cur_ans.clear();
        }
    }
    if (cur_ans.length() > max_ans.length()) {
        max_ans = cur_ans;
    }
    cout<<max_ans<<endl;
    return 0;


}
